 
*clear all
set more off

ssc install center
set scheme paul

global dataPath "~/Dropbox/GGLS_munis/Code/replication_package/Data"
global codePath "$dataPath/../Code/"
global tablePath "$dataPath/../Output/Tables"
global graphPath "$dataPath/../Output/Figures"
global isbal="balanced"
global controls non_go_dum bond_age liq_turnover_w irs_avg_income price_month_stdev  
global intcontrols  i.year##c.(insured_dum  callable_dum log_maturity )  


/**** SETUP MAIN REGRESSION DATA ****/
/*
global isbal="balanced"
global bond_age=1
do "$codePath/prep_regression_data.do"
save "$dataPath/final_regression_data.dta", replace

*/

/*** Make Figures + Tables from Main Draft **/
use "$dataPath/final_regression_data.dta", clear
global  feet= 6
local feet $feet
capture drop pct_std 
center percent_exposed_`feet', g(pct_std) standardize
replace pctexposed=percent_exposed_`feet'
label var pct_std "SLR Exposure"
label var log_median_hp "Log(Median House Price)"

do "$codePath/make_main_exhibits.do"

do "$codePath/make_incremental_exhibits.do"

/**** For the Matlab code, see merton_script_forRFS.m ****/

/** Make Figures + Tables for Appendix **/
use "$dataPath/final_regression_data.dta", clear
global  feet= 6
local feet $feet
capture drop pct_std 
center percent_exposed_`feet', g(pct_std) standardize
replace pctexposed=percent_exposed_`feet'
label var pct_std "SLR Exposure"
label var log_median_hp "Log(Median House Price)"

do $codePath/make_appendix_exhibits.do

/*** Painter Replication for Appendix **/
/*** Please contact Painter for data for this analysis ***/
*do $codePath/painter_replication_forRFS.do
 
 
